import Home  from "./pages/Home"
import Login  from "./pages/Login"
import Page  from "./pages/Page"

import {BrowserRouter as Router, Switch, Route,Link } from 'react-router-dom'
function App(){
  return (<div>
    <Router>
      <Link to='/'>主页</Link>
      <Link to='/login'>登录</Link>
      <Switch>
            <Route path='/' component={Home} exact/>
            <Route path='/login' component={Login}/>
            <Route path='/page/:id' component={Page}/>
      </Switch>
    </Router>
    
  </div>)
}
export default App